package com.easyjava.qingke.app;

import java.util.HashMap;

public class JsonDemo {
	
	public static void main(String[] args) {
		String json="{id:75,name:xy,url:com.qingke.me,tag:{name:67}}";
	    System.out.println(test(json));
	}
	
	
	public static HashMap test(String json){
		String sb="";
		HashMap hash =new HashMap<String,String>();
		String[] strArray =null;
		if(json.contains("{")&&json.contains("}")){
			sb=json.substring(1,json.length()-1);
			strArray=sb.split(",");
			for(String string:strArray){
				String[] stringAry =string.split(":");
				hash.put(stringAry[0], stringAry[1]);
			}
		}
			return hash;
	}
	

}
